home *** CD-ROM | disk | FTP | other *** search
- /*********************************************************
- "start.c"
-
- by John A. Love, III [ Washington Apple Pi Users' Group]
-
- using Symantec's "THINK C", v 5.00
- *********************************************************/
-
-
- #include "protos"
-
- #include "globals.h"
- #include "extern.h"
-
- #include "ADBLights.h"
- #include "floatingWindow.h"
-
-
- void main (void);
-
-
-
-
- void main (void) {
-
- WindowPtr floatTool;
- PicHandle floatPict, centeredPic;
- Rect windRect, centeredPictRect;
-
-
- InitManagers(); /* The usual stuff ... */
- ;
- {
- short *ROM = (wordPtr)(ROM85Loc);
-
- if (*ROM > 0) gMBarHt = GetMBarHeight();
- else ExitToShell(); /* NO workee !!! */
- }
- ;
- SetCursor(*GetCursor(watchCursor));
-
- // Init some Globals ...
- gInitAppleEvents = InitAppleEvents(); /* errs in "AppleEvents.c" ... */
- gInitPPCToolbox = InitPPCToolbox();
- gSys7 = System7isUp();
- gStripAddressMask = GetStripAddressMask();
- gDone = false;
- gInForeGround = true; /* Assume Unifinder. */
- gWNE = WNEisImplemented();
- gStartBalloons = BalloonsOn();
- gLastBalloon = -1; /* = notMine. */
- gMac2 = TestForColor(&gColorDepth); /* Feeds InitBigScreen. */
- InitBigScreen(&gFPDRsrc, &gSizeFont);
-
- Init_Help();
- TInitWindows();
-
- System7Braggart();
-
- SetUpMainMenus();
-
- DoSpiffyIris();
-
- floatTool = TMakeNewTool(FLOAT, nil, inFront);
- if (floatTool) {
- floatPict = GetPicture(FLOAT);
- if (floatPict) {
- windRect = floatTool->portRect;
- centeredPictRect = (**floatPict).picFrame;
- CenterRects(¢eredPictRect, &windRect);
- ;
- centeredPic = OpenPicture(&windRect);
- ClipRect(&windRect);
- EraseRect(&windRect);
- DrawPicture(floatPict, ¢eredPictRect);
- ClosePicture();
- ;
- SetWindowPic(floatTool, centeredPic);
- ReleaseResource(floatPict); /* Kiss the original good-bye !! */
- }
- TShowWindow(floatTool);
- }
-
- MainEventLoop();
-
- ResetBalloons(gStartBalloons);
- PlaySound("Moof");
-
- InstallVBLTask(acurDogCow);
- BlinkAllADBLights();
- RemoveVBLTask();
- ;
- ExitToShell();
-
-
- } /* main */
-
-
-
-
- /* { end file "start.c" } */
-